from selenium import  webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.wait import WebDriverWait

class Userpage:
    def __init__(self):
        self.driver=webdriver.Chrome()


    logout_locator=(By.LINK_TEXT,'安全退出')

    def is_exist_logout(self):

        try:
            WebDriverWait(self.driver,5).until(EC.visibility_of_element_located(self.logout_locator))
            return True
        except Exception as e:
            return False












